/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.wii.elpro.web.form;

import java.io.Serializable;
import org.apache.struts.validator.ValidatorForm;

/**
 *
 * @author Vyor
 */
public class UnitNewForm extends ValidatorForm implements Serializable {
    private String nama;

    public String getNama() {
        return nama;
    }

    public void setNama(String nama) {
        this.nama = nama;
    }
    
//    @Override
//    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
//        ActionErrors errors = new ActionErrors();
//        boolean unitIsUsed = false;
//        try {
//            unitIsUsed = new UnitDAOImpl().unitIsUsed(this.getNama());
//            if (unitIsUsed)
//               errors.add("unitname", new ActionMessage("errors.unitNameIsUsed"));
//        } catch (Exception ex) {
//            ex.printStackTrace();
//        }        
//        return errors;
//    }
}
